20. Lesson Conclusion

Lesson Conclusion

ND079 JPND C3 L5 A15 Lesson Conclusion V3

Summary

We covered a lot in this lesson. It was hard to pick! In this lesson, we learned about:

  • Using Test Doubles to exclude reliance on dependencies
  • Using Mockito to create Test Doubles for us
  • Integration Tests and using WireMock to mimic the behavior of an external API

Glossary

ArgumentMatchers: A Mockito library for accepting variable input to Mock methods.

CircleCI: A simple continuous integration provider that can automatically build and run unit tests on GitHub projects.

Containerization: creating a self-contained environment with known parameters to build and run your application.

Continuous Delivery: a process that follows Continous Integration and involves creating deployable build artifacts every time the project changes.

Continuous Integration: the process of automatically running unit tests any time your code changes. It usually is performed by a service that monitors the state of your repository and runs all your unit tests whenever you commit new changes.

Docker: an application that provides a container format and an engine that can run those containers.

Dummy: A class that doesn't actually do anything, but fills a required parameter of some method.

Fake: A test double that allows you to customize the response to imitate actual functionality.

Functional Tests: Verify the behavior of your application from start to finish, including interaction with the UI and database.

Integration Tests: Test the interaction between Units. Span multiple components.

Mock: A generic term for test doubles, or more specifically, a test double that can prepare specific responses for different kinds of input.

Mockito: A framework that can automatically generate mock objects.

Mockito Mock: An object that can programmatically implement any behavior from any of the test doubles we learned earlier. Mockito Mocks can be spies, dummies, stubs, or mocks.

Mockito Spy: An object can do everything a Mock can do, but it also inherits the behavior of the class it extends. Made from an implementation class rather than an interface. Sometimes referred to as a partial mock.

Stub: A simple class that always returns a hard-coded value.

Spy: A test double that can keep track of which methods were called. Sometimes they can also track what parameters were used or how often the methods were called.

Test Double: Any kind of object that acts as a stand-in for an expected dependency in order to facilitate testing.

Verify: A Mockito method that checks if a specific method has been called.

Wiremock: A library that can create a temporary server to return preassigned values to http requests.